
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Linux · GitBook笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="chenjiebin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="kylin.html" />
    
    
    <link rel="prev" href="gitbook.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../document/kubernetes/kubernetes.html">
            
                <a href="../document/kubernetes/kubernetes.html">
            
                    
                    Kubernetes英文教程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../document/kubernetes/kubernetes.html">
            
                <a href="../document/kubernetes/kubernetes.html#concepts">
            
                    
                    Kubernetes Concepts
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../document/kubernetes/concepts/overview.html">
            
                <a href="../document/kubernetes/concepts/overview.html">
            
                    
                    Kubernetes Overview
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../document/kubernetes/concepts/components.html">
            
                <a href="../document/kubernetes/concepts/components.html">
            
                    
                    Kubernetes Components
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="../document/kubernetes/concepts/nodes.html">
            
                <a href="../document/kubernetes/concepts/nodes.html">
            
                    
                    Kubernetes Nodes
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../document/kubernetes/kubernetes.html">
            
                <a href="../document/kubernetes/kubernetes.html#tutorial">
            
                    
                    Kubernetes Tutorial
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../document/kubernetes/tutorial/kubernetes-basics.html">
            
                <a href="../document/kubernetes/tutorial/kubernetes-basics.html">
            
                    
                    Kubernetes Basics
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../java/java.html">
            
                <a href="../java/java.html">
            
                    
                    Java基础知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../java/java-summary.html">
            
                <a href="../java/java-summary.html">
            
                    
                    Java_Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../java/java-jvm.html">
            
                <a href="../java/java-jvm.html">
            
                    
                    Java_JVM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../java/effectiveJava.html">
            
                <a href="../java/effectiveJava.html">
            
                    
                    effectiveJava
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../java/design-pattern.html">
            
                <a href="../java/design-pattern.html">
            
                    
                    设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../java/JavaTest.html">
            
                <a href="../java/JavaTest.html">
            
                    
                    JavaTest
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../java/myframe.html">
            
                <a href="../java/myframe.html">
            
                    
                    MyFrame
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../database/database.html">
            
                <a href="../database/database.html">
            
                    
                    数据库基础知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../database/mysql.html">
            
                <a href="../database/mysql.html">
            
                    
                    MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../database/redis.html">
            
                <a href="../database/redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../database/kingbase.html">
            
                <a href="../database/kingbase.html">
            
                    
                    KingBase
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../database/polardb.html">
            
                <a href="../database/polardb.html">
            
                    
                    PolarDB
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="system.html">
            
                <a href="system.html">
            
                    
                    环境配置工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="nodejs.html">
            
                <a href="nodejs.html">
            
                    
                    Node.js
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="gitbook.html">
            
                <a href="gitbook.html">
            
                    
                    Gitbook
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.3" data-path="linux.html">
            
                <a href="linux.html">
            
                    
                    Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="kylin.html">
            
                <a href="kylin.html">
            
                    
                    麒麟系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../tool/tool.html">
            
                <a href="../tool/tool.html">
            
                    
                    开发工具介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../tool/docker.html">
            
                <a href="../tool/docker.html">
            
                    
                    Docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../tool/idea.html">
            
                <a href="../tool/idea.html">
            
                    
                    Idea
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../tool/maven.html">
            
                <a href="../tool/maven.html">
            
                    
                    Maven
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../tool/gradle.html">
            
                <a href="../tool/gradle.html">
            
                    
                    Gradle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../framework/kubernate.html">
            
                <a href="../framework/kubernate.html">
            
                    
                    Kubernetes
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Linux</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#linux&#x547D;&#x4EE4;"><b>1. </b>Linux&#x547D;&#x4EE4;</a></li><ul><li><span class="title-icon "></span><a href="#shell"><b>1.1. </b>SHELL</a></li><li><span class="title-icon "></span><a href="#&#x5E2E;&#x52A9;&#x547D;&#x4EE4;"><b>1.2. </b>&#x5E2E;&#x52A9;&#x547D;&#x4EE4;</a></li><li><span class="title-icon "></span><a href="#&#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;"><b>1.3. </b>&#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;</a></li></ul><li><span class="title-icon "></span><a href="#linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;"><b>2. </b>Linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;</a></li><ul><li><span class="title-icon "></span><a href="#syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><b>2.1. </b>syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;</a></li><li><span class="title-icon "></span><a href="#&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><b>2.2. </b>&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;</a></li><li><span class="title-icon "></span><a href="#systemd&#x65E5;&#x5FD7;"><b>2.3. </b>systemd&#x65E5;&#x5FD7;</a></li><li><span class="title-icon "></span><a href="#&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;"><b>2.4. </b>&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;</a></li></ul><li><span class="title-icon "></span><a href="#dpkg&#x7528;&#x6CD5;"><b>3. </b>dpkg&#x7528;&#x6CD5;</a></li><ul><li><span class="title-icon "></span><a href="#dpkg--l"><b>3.1. </b>dpkg -l</a></li></ul><li><span class="title-icon "></span><a href="#&#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;"><b>4. </b>&#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;</a></li><ul><li><span class="title-icon "></span><a href="#&#x6302;&#x8F7D;&#x78C1;&#x76D8;"><b>4.1. </b>&#x6302;&#x8F7D;&#x78C1;&#x76D8;</a></li><li><span class="title-icon "></span><a href="#&#x78C1;&#x76D8;&#x65E5;&#x5FD7;"><b>4.2. </b>&#x78C1;&#x76D8;&#x65E5;&#x5FD7;</a></li><li><span class="title-icon "></span><a href="#&#x78C1;&#x76D8;&#x4ECB;&#x7ECD;"><b>4.3. </b>&#x78C1;&#x76D8;&#x4ECB;&#x7ECD;</a></li></ul><li><span class="title-icon "></span><a href="#&#x53C2;&#x8003;&#x6587;&#x6863;"><b>5. </b>&#x53C2;&#x8003;&#x6587;&#x6863;</a></li></ul></div><a href="#linux&#x547D;&#x4EE4;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="linux&#x547D;&#x4EE4;"><a name="linux&#x547D;&#x4EE4;" class="anchor-navigation-ex-anchor" href="#linux&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>1. Linux&#x547D;&#x4EE4;</h1>
<h2 id="shell"><a name="shell" class="anchor-navigation-ex-anchor" href="#shell"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. SHELL</h2>
<p>Linux&#x7CFB;&#x7EDF;&#x5185;&#x6838;&#x8D1F;&#x8D23;&#x5B8C;&#x6210;&#x5BF9;&#x786C;&#x4EF6;&#x8D44;&#x6E90;&#x7684;&#x5206;&#x914D;&#x3001;&#x8C03;&#x5EA6;&#x7B49;&#x7BA1;&#x7406;&#x4EFB;&#x52A1;</p>
<p>Bash&#xFF08;Bourne-Again SHell&#xFF09;&#x89E3;&#x91CA;&#x5668;</p>
<ul>
<li>&#x4E0A;&#x4E0B;&#x952E;&#x8C03;&#x53D6;&#x8FC7;&#x5F80;&#x6267;&#x884C;&#x8FC7;&#x7684;&#x547D;&#x4EE4;</li>
<li>Tab&#x952E;&#x8865;&#x5168;&#x547D;&#x4EE4;&#x6216;&#x53C2;&#x6570;</li>
<li>&#x5F3A;&#x5927;&#x7684;&#x6279;&#x5904;&#x7406;&#x811A;&#x672C;</li>
<li>&#x5B9E;&#x7528;&#x7684;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x529F;&#x80FD;</li>
</ul>
<h2 id="&#x5E2E;&#x52A9;&#x547D;&#x4EE4;"><a name="&#x5E2E;&#x52A9;&#x547D;&#x4EE4;" class="anchor-navigation-ex-anchor" href="#&#x5E2E;&#x52A9;&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. &#x5E2E;&#x52A9;&#x547D;&#x4EE4;</h2>
<pre class="language-"><code>[root] man man
  - &#x67E5;&#x8BE2;&#xFF1A;/linux ?linux&#xFF1B;&#x5411;&#x540E;&#x5411;&#x524D;&#x5B9A;&#x4F4D;&#xFF1A;n N&#xFF1B;&#x7A7A;&#x683C; up down home end q
  - NAME            &#x547D;&#x4EE4;&#x540D;&#x79F0;
  - SYNOPSIS        &#x53C2;&#x6570;&#x7684;&#x5927;&#x81F4;&#x4F7F;&#x7528;&#x65B9;&#x6CD5;
  - DESCRIPTION     &#x4ECB;&#x7ECD;&#x8BF4;&#x660E;
  - EXAMPLES        &#x6F14;&#x793A;
  - OVERVIEW        &#x6982;&#x8FF0;
  - DEFAULTS        &#x9ED8;&#x8BA4;&#x529F;&#x80FD;
  - OPTIONS         &#x5177;&#x4F53;&#x53EF;&#x7528;&#x9009;&#x9879;
  - ENVIRONMENT     &#x73AF;&#x5883;&#x53D8;&#x91CF;
  - FILES           &#x7528;&#x5230;&#x7684;&#x6587;&#x4EF6;
  - SEE ALSO        &#x76F8;&#x5173;&#x8D44;&#x6599;
  - HISTORY         &#x7EF4;&#x62A4;&#x5386;&#x53F2;&#x4E0E;&#x8054;&#x7CFB;&#x65B9;&#x5F0F;
</code></pre><h2 id="&#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;"><a name="&#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;" class="anchor-navigation-ex-anchor" href="#&#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x5E38;&#x7528;&#x7CFB;&#x7EDF;&#x5DE5;&#x4F5C;&#x547D;&#x4EE4;</h2>
<blockquote>
<p>&#x663E;&#x793A;&#x5185;&#x5BB9;</p>
</blockquote>
<p>echo [&#x5B57;&#x7B26;&#x4E32; | $&#x53D8;&#x91CF;]</p>
<pre class="language-"><code>echo helloword
echo $SHELL
</code></pre><blockquote>
<p>&#x663E;&#x793A;&#x65E5;&#x671F;</p>
</blockquote>
<p>date [&#x9009;&#x9879;] [+&#x6307;&#x5B9A;&#x7684;&#x683C;&#x5F0F;]</p>
<pre class="language-"><code>date
date &quot;+%Y-%m-%d %H:%M:%S&quot;
date -s &quot;20201201 08:01:01&quot;
date &quot;+%j&quot;
</code></pre><blockquote>
<p>&#x91CD;&#x542F;&#x8BA1;&#x7B97;&#x673A;</p>
</blockquote>
<p>reboot</p>
<blockquote>
<p>&#x5173;&#x95ED;&#x8BA1;&#x7B97;&#x673A;</p>
</blockquote>
<p>poweroff</p>
<blockquote>
<p>&#x4E0B;&#x8F7D;&#x6587;&#x4EF6;</p>
</blockquote>
<p>wget [&#x53C2;&#x6570;] &#x4E0B;&#x8F7D;&#x5730;&#x5740;</p>
<ul>
<li>-b &#x540E;&#x53F0;&#x4E0B;&#x8F7D;&#x6A21;&#x5F0F;</li>
<li>-P &#x4E0B;&#x8F7D;&#x5230;&#x6307;&#x5B9A;&#x76EE;&#x5F55;</li>
<li>-t &#x6700;&#x5927;&#x5C1D;&#x8BD5;&#x6B21;&#x6570;</li>
<li>-c &#x65AD;&#x70B9;&#x7EED;&#x4F20;</li>
<li>-p &#x4E0B;&#x8F7D;&#x9875;&#x9762;&#x5185;&#x6240;&#x6709;&#x8D44;&#x6E90;&#xFF0C;&#x5305;&#x62EC;&#x56FE;&#x7247;&#xFF0C;&#x89C6;&#x9891;&#x7B49;</li>
<li>-r &#x9012;&#x5F52;&#x4E0B;&#x8F7D;</li>
</ul>
<blockquote>
<p>&#x67E5;&#x770B;&#x8FDB;&#x7A0B;</p>
</blockquote>
<p>ps [&#x53C2;&#x6570;]</p>
<ul>
<li>-a &#x663E;&#x793A;&#x6240;&#x6709;&#x8FDB;&#x7A0B;&#xFF08;&#x5305;&#x62EC;&#x5176;&#x4ED6;&#x7528;&#x6237;&#x7684;&#x8FDB;&#x7A0B;&#xFF09;</li>
<li>-w &#x7528;&#x6237;&#x4EE5;&#x53CA;&#x5176;&#x4ED6;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;</li>
<li>-x &#x663E;&#x793A;&#x6CA1;&#x6709;&#x63A7;&#x5236;&#x7EC8;&#x7AEF;&#x7684;&#x8FDB;&#x7A0B;</li>
</ul>
<p>&#x5E38;&#x89C1;&#x8FDB;&#x7A0B;&#x72B6;&#x6001;</p>
<ul>
<li>R &#x8FD0;&#x884C;      &#x8FDB;&#x7A0B;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x6216;&#x8005;&#x8FD0;&#x884C;&#x961F;&#x5217;&#x4E2D;&#x7B49;&#x5F85;</li>
<li>S &#x4E2D;&#x65AD;      &#x8FDB;&#x7A0B;&#x57FA;&#x7840;&#x4F11;&#x7720;&#x4E2D;&#xFF0C;&#x5F53;&#x67D0;&#x4E2A;&#x6761;&#x4EF6;&#x5F62;&#x6210;&#x540E;&#x6216;&#x8005;&#x63A5;&#x53D7;&#x5230;&#x4FE1;&#x53F7;&#x65F6;&#xFF0C;&#x8131;&#x79BB;&#x8BE5;&#x72B6;&#x6001;</li>
<li>D &#x4E0D;&#x53EF;&#x4E2D;&#x65AD;   &#x8FDB;&#x7A0B;&#x4E0D;&#x54CD;&#x5E94;&#x7CFB;&#x7EDF;&#x5F02;&#x6B65;&#x4FE1;&#x53F7;&#xFF0C;&#x5373;&#x4F7F;&#x7528;kill&#x547D;&#x4EE4;&#x4E5F;&#x4E0D;&#x80FD;&#x5C06;&#x5176;&#x4E2D;&#x65AD;</li>
<li>Z &#x50F5;&#x6B7B;      &#x8FDB;&#x7A0B;&#x5DF2;&#x7EC8;&#x6B62;&#xFF0C;&#x5355;&#x8FDB;&#x7A0B;&#x63CF;&#x8FF0;&#x7B26;&#x4F9D;&#x7136;&#x5B58;&#x5728;&#xFF0C;&#x76F4;&#x5230;&#x7236;&#x8FDB;&#x7A0B;&#x8C03;&#x7528;wait4()&#x7CFB;&#x7EDF;&#x51FD;&#x6570;&#x540E;&#x5C06;&#x8FDB;&#x7A0B;&#x91CA;&#x653E;</li>
<li>T &#x505C;&#x6B62;      &#x8FDB;&#x7A0B;&#x6536;&#x5230;&#x505C;&#x6B62;&#x4FE1;&#x53F7;&#x540E;&#x505C;&#x6B62;&#x8FD0;&#x884C;</li>
</ul>
<blockquote>
<p>```</p>
</blockquote>
<pre class="language-"><code>
&gt;
</code></pre><pre class="language-"><code>
&gt;
</code></pre><pre class="language-"><code>
&gt;
</code></pre><pre class="language-"><code>
## &#x5E38;&#x7528;&#x547D;&#x4EE4;

```bash
# &#x5217;&#x4E3E;&#x6587;&#x4EF6;&#x6216;&#x6587;&#x4EF6;&#x5939;&#xFF0C;list
ls

# &#x65B0;&#x589E;&#x76EE;&#x5F55;&#xFF0C;make directory
mkdir

# &#x663E;&#x793A;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;&#xFF0C;print working directory
pwd

# &#x5207;&#x6362;&#x8DEF;&#x5F84;&#xFF0C;change directory
cd

# &#x5220;&#x9664;&#x76EE;&#x5F55;&#xFF0C;remove directory
rmdir

# &#x5220;&#x9664;&#x6307;&#x5B9A;&#x6587;&#x4EF6;&#xFF0C;remove
rm

# &#x590D;&#x5236;&#x6587;&#x4EF6;&#xFF0C;copy
cp

# &#x79FB;&#x52A8;&#x6587;&#x4EF6;&#x6216;&#x6587;&#x4EF6;&#x5939;&#xFF0C;move
mv

# &#x67E5;&#x770B;&#x6587;&#x4EF6;&#x5185;&#x5BB9;&#xFF0C;concatenate and print files
cat

# &#x67E5;&#x770B;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x5341;&#x884C;&#x5185;&#x5BB9;&#xFF0C;print tail (from last)
tail

# &#x6309;&#x9875;&#x663E;&#x793A;&#x5927;&#x6587;&#x4EF6;&#xFF0C;print LESS
less

# &#x7ED9;&#x5B9A;&#x6587;&#x4EF6;&#x4E2D;&#x67E5;&#x627E;&#x5B57;&#x7B26;&#x4E32;
grep

# &#x5728;&#x7ED9;&#x5B9A;&#x4F4D;&#x7F6E;&#x641C;&#x7D22;&#x5339;&#x914D;&#x7684;&#x6587;&#x4EF6;
find

# &#x521B;&#x5EFA;&#x3001;&#x67E5;&#x770B;&#x548C;&#x63D0;&#x53D6;jar&#x538B;&#x7F29;&#x6587;&#x4EF6;
tar -xvf

# &#x521B;&#x5EFA;&#x548C;&#x63D0;&#x53D6;gzip&#x6587;&#x4EF6;
gzip -d

# &#x89E3;&#x538B;gzip&#x6587;&#x4EF6;
unzip (-l)

# &#x6D4B;&#x8BD5;&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#x548C;&#x670D;&#x52A1;&#x5668;&#x72B6;&#x6001;
ping

# &#x663E;&#x793A;&#x5F53;&#x524D;&#x767B;&#x9646;&#x7528;&#x6237;&#x540D;
who

# &#x5207;&#x6362;&#x4E0D;&#x540C;&#x8D26;&#x53F7;
su

# &#x67E5;&#x770B;&#x7CFB;&#x7EDF;&#x4FE1;&#x606F;
uname

# &#x67E5;&#x770B;&#x7CFB;&#x7EDF;&#x8FDB;&#x7A0B; ProcessS
ps

# &#x67E5;&#x770B;cpu&#x5360;&#x7528;&#x60C5;&#x51B5;
top

# &#x5173;&#x95ED;&#x8BA1;&#x7B97;&#x673A;
shutdown
</code></pre><h1 id="linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;"><a name="linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;" class="anchor-navigation-ex-anchor" href="#linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;"><i class="fa fa-link" aria-hidden="true"></i></a>2. Linux&#x65E5;&#x5FD7;&#x7CFB;&#x7EDF;</h1>
<h2 id="syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><a name="syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;" class="anchor-navigation-ex-anchor" href="#syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><i class="fa fa-link" aria-hidden="true"></i></a>2.1. syslog&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x548C;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;</h2>
<h2 id="&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><a name="&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;" class="anchor-navigation-ex-anchor" href="#&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2. &#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x8F6E;&#x8F6C;</h2>
<h2 id="systemd&#x65E5;&#x5FD7;"><a name="systemd&#x65E5;&#x5FD7;" class="anchor-navigation-ex-anchor" href="#systemd&#x65E5;&#x5FD7;"><i class="fa fa-link" aria-hidden="true"></i></a>2.3. systemd&#x65E5;&#x5FD7;</h2>
<h2 id="&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;"><a name="&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;" class="anchor-navigation-ex-anchor" href="#&#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;"><i class="fa fa-link" aria-hidden="true"></i></a>2.4. &#x4F7F;&#x7528;&#x65E5;&#x5FD7;&#x6848;&#x4F8B;</h2>
<h1 id="dpkg&#x7528;&#x6CD5;"><a name="dpkg&#x7528;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#dpkg&#x7528;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>3. dpkg&#x7528;&#x6CD5;</h1>
<ol>
<li>&#x5B89;&#x88C5;&#x547D;&#x4EE4;&#xFF1A;<strong>dpkg -i xxx.deb</strong></li>
<li>&#x5B89;&#x88C5;&#x76EE;&#x5F55;&#x4E0B;&#x6240;&#x6709;&#x8F6F;&#x4EF6;&#x5305;&#xFF1A;dpkg -R /usr/local/src</li>
<li>&#x91CA;&#x653E;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x4E0D;&#x8FDB;&#x884C;&#x914D;&#x7F6E;&#xFF1A;dpkg --unpack xxx.deb</li>
<li>&#x91CD;&#x65B0;&#x914D;&#x7F6E;&#x548C;&#x91CA;&#x653E;&#x8F6F;&#x4EF6;&#x5305;&#xFF1A;dpkg --configure xxx.deb</li>
<li>&#x5220;&#x9664;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x4FDD;&#x7559;&#x914D;&#x7F6E;&#x4FE1;&#x606F;&#xFF1A;dpkg -r xxx</li>
<li>&#x66FF;&#x4EE3;&#x8F6F;&#x4EF6;&#x5305;&#x4FE1;&#x606F;&#xFF1A;dpkg --update-avail xxx</li>
<li>&#x5408;&#x5E76;&#x8F6F;&#x4EF6;&#x5305;&#x4FE1;&#x606F;&#xFF1A;dpkg --merge-avail xxx</li>
<li>&#x4ECE;&#x8F6F;&#x4EF6;&#x5305;&#x8BFB;&#x53D6;&#x8F6F;&#x4EF6;&#x4FE1;&#x606F;&#xFF1A;dpkg -A xxx</li>
<li>&#x5220;&#x9664;&#x8F6F;&#x4EF6;&#x5305;&#xFF0C;&#x5305;&#x62EC;&#x914D;&#x7F6E;&#x4FE1;&#x606F;&#xFF1A;dpkg -P xxx</li>
<li>&#x4E22;&#x5931;&#x6240;&#x6709;&#x7684;Uninstall&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x4FE1;&#x606F;&#xFF1A;dpkg --forget-old-unavail</li>
<li>&#x5220;&#x9664;&#x8F6F;&#x4EF6;&#x5305;&#x7684;Avaliable&#x4FE1;&#x606F;&#xFF1A;dpkg --clear-avail</li>
<li>&#x67E5;&#x627E;&#x53EA;&#x6709;&#x90E8;&#x5206;&#x5B89;&#x88C5;&#x7684;&#x8F6F;&#x4EF6;&#x5305;&#x4FE1;&#x606F;&#xFF1A;<strong>dpkg -C</strong></li>
<li>&#x6BD4;&#x8F83;&#x540C;&#x4E00;&#x4E2A;&#x5305;&#x7684;&#x4E0D;&#x540C;&#x7248;&#x672C;&#x4E4B;&#x95F4;&#x7684;&#x5DEE;&#x522B;&#xFF1A;dpkg --compare-version ver1 op ver2</li>
<li>&#x663E;&#x793A;&#x5E2E;&#x52A9;&#x547D;&#x4EE4;&#xFF1A;dpkg --help</li>
<li>&#x663E;&#x793A;dpkg&#x7684;Licence&#xFF1A;dpkg --licence / dpkg --license</li>
<li>&#x663E;&#x793A;dpkg&#x7684;&#x7248;&#x672C;&#x53F7;&#xFF1A;dpkg --version</li>
<li>&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;deb&#x6587;&#x4EF6;&#xFF1A;dpkg -b xxx</li>
<li>&#x663E;&#x793A;&#x4E00;&#x4E2A;Deb&#x6587;&#x4EF6;&#x7684;&#x76EE;&#x5F55;&#xFF1A;<strong>dpkg -c xxx</strong></li>
<li>&#x663E;&#x793A;&#x4E00;&#x4E2A;Deb&#x7684;&#x8BF4;&#x660E;&#xFF1A;dpkg -l xxx</li>
<li>&#x641C;&#x7D22;Deb&#x5305;&#xFF1A;<strong>dpkg -l xxx</strong></li>
<li>&#x663E;&#x793A;&#x6240;&#x6709;&#x5DF2;&#x5B89;&#x88C5;&#x7684;Deb&#x5305;&#xFF0C;&#x7248;&#x672C;&#x53F7;&#x53CA;&#x8BF4;&#x660E;&#xFF1A;dpkg -l</li>
<li>&#x62A5;&#x544A;&#x6307;&#x5B9A;&#x5305;&#x7684;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#xFF1A;dpkg -s xxx</li>
<li>&#x663E;&#x793A;&#x4E00;&#x4E2A;&#x5305;&#x5B89;&#x88C5;&#x5230;&#x7CFB;&#x7EDF;&#x91CC;&#x9762;&#x7684;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#x4FE1;&#x606F;&#xFF1A;<strong>dpkg -L xxx</strong></li>
<li>&#x641C;&#x7D22;&#x6307;&#x5B9A;&#x5305;&#x91CC;&#x9762;&#x7684;&#x6587;&#x4EF6;&#xFF1A;dpkg -S xxx</li>
<li>&#x663E;&#x793A;&#x5305;&#x7684;&#x5177;&#x4F53;&#x4FE1;&#x606F;&#xFF1A;dpkg -p xxx</li>
</ol>
<h2 id="dpkg--l"><a name="dpkg--l" class="anchor-navigation-ex-anchor" href="#dpkg--l"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. dpkg -l</h2>
<p>&#x5217;&#x4E3E;&#x8F6F;&#x4EF6;&#x5305;&#x4FE1;&#x606F;</p>
<p>&#x5E38;&#x89C1;&#x547D;&#x4EE4;&#xFF1A;</p>
<ul>
<li><p>ii&#xFF1A;&#x8F6F;&#x4EF6;&#x6B63;&#x5E38;&#x5B89;&#x88C5;</p>
</li>
<li><p>rc&#xFF1A;&#x8F6F;&#x4EF6;&#x5DF2;&#x5378;&#x8F7D;&#xFF0C;&#x4FDD;&#x7559;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4FE1;&#x606F;</p>
</li>
</ul>
<p>&#x7B2C;&#x4E00;&#x5217;&#x662F;&#x671F;&#x671B;&#x503C;&#xFF1A;</p>
<ul>
<li>u&#xFF1A;&#x72B6;&#x6001;&#x672A;&#x77E5;&#xFF0C;&#x8F6F;&#x4EF6;&#x672A;&#x5B89;&#x88C5;&#xFF0C;&#x7528;&#x6237;&#x6CA1;&#x6709;&#x53D1;&#x51FA;&#x5B89;&#x88C5;&#x8BF7;&#x6C42;</li>
<li>i&#xFF1A;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x5B89;&#x88C5;&#x8F6F;&#x4EF6;&#x5305;</li>
<li>r&#xFF1A;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x5378;&#x8F7D;&#x8F6F;&#x4EF6;&#x5305;</li>
<li>p&#xFF1A;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x6E05;&#x9664;&#x8F6F;&#x4EF6;&#x5305;</li>
<li>h&#xFF1A;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x4FDD;&#x6301;&#x8F6F;&#x4EF6;&#x5305;&#x7248;&#x672C;&#x9501;&#x5B9A;</li>
</ul>
<p>&#x7B2C;&#x4E8C;&#x5217;&#x662F;&#x8F6F;&#x4EF6;&#x5305;&#x5F53;&#x524D;&#x72B6;&#x6001;&#xFF1A;</p>
<ul>
<li>n&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x672A;&#x5B89;&#x88C5;</li>
<li>i&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x5B89;&#x88C5;&#x5E76;&#x5B8C;&#x6210;&#x914D;&#x7F6E;</li>
<li>c&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x5DF2;&#x5220;&#x9664;&#xFF0C;&#x4FDD;&#x7559;&#x914D;&#x7F6E;&#x6587;&#x4EF6;</li>
<li>u&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x5DF2;&#x89E3;&#x538B;&#xFF0C;&#x8FD8;&#x672A;&#x914D;&#x7F6E;</li>
<li>f&#xFF1A;&#x914D;&#x7F6E;&#x8F6F;&#x4EF6;&#x5305;&#x5931;&#x8D25;</li>
<li>h&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x5DF2;&#x5B89;&#x88C5;&#xFF0C;&#x6CA1;&#x6709;&#x6210;&#x529F;</li>
</ul>
<p>&#x7B2C;&#x4E09;&#x5217;&#x6807;&#x8BC6;&#x9519;&#x8BEF;&#x72B6;&#x6001;&#xFF1A;</p>
<ul>
<li>&#x7A7A;&#xFF0C;&#x72B6;&#x6001;&#x6807;&#x8BC6;&#x6CA1;&#x6709;&#x95EE;&#x9898;</li>
<li>h&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x88AB;&#x5F3A;&#x5236;&#x4FDD;&#x6301;&#xFF0C;&#x56E0;&#x4E3A;&#x6709;&#x5176;&#x4ED6;&#x8F6F;&#x4EF6;&#x5305;&#x4F9D;&#x8D56;&#x9700;&#x6C42;&#xFF0C;&#x65E0;&#x6CD5;&#x5347;&#x7EA7;</li>
<li>r&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x88AB;&#x7834;&#x574F;&#xFF0C;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x5B89;&#x88C5;&#x624D;&#x80FD;&#x6B63;&#x5E38;&#x4F7F;&#x7528;&#xFF08;&#x5305;&#x62EC;&#x5220;&#x9664;&#xFF09;</li>
<li>x&#xFF1A;&#x8F6F;&#x4EF6;&#x5305;&#x88AB;&#x7834;&#x574F;&#xFF0C;&#x5E76;&#x4E14;&#x5F3A;&#x5236;&#x4FDD;&#x6301;</li>
</ul>
<h1 id="&#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;"><a name="&#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#&#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x78C1;&#x76D8;&#x5206;&#x533A;&#x6302;&#x8F7D;</h1>
<h2 id="&#x6302;&#x8F7D;&#x78C1;&#x76D8;"><a name="&#x6302;&#x8F7D;&#x78C1;&#x76D8;" class="anchor-navigation-ex-anchor" href="#&#x6302;&#x8F7D;&#x78C1;&#x76D8;"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. &#x6302;&#x8F7D;&#x78C1;&#x76D8;</h2>
<blockquote>
<p>&#x67E5;&#x770B;&#x78C1;&#x76D8;&#x4F7F;&#x7528;&#x60C5;&#x51B5;</p>
</blockquote>
<pre class="language-"><code class="lang-shell">lsblk
</code></pre>
<blockquote>
<p>&#x5BF9;&#x6570;&#x636E;&#x76D8;&#x5206;&#x533A;</p>
</blockquote>
<pre class="language-"><code class="lang-shell"><span class="token function">fdisk</span> /dev/vdc
<span class="token comment"># 1.&#x65B0;&#x5EFA;&#x5206;&#x533A;&#xFF1A;&#x8F93;&#x5165;n</span>
<span class="token comment"># 2.&#x5206;&#x533A;&#x7C7B;&#x578B;&#xFF1A;&#x9009;&#x9ED8;&#x8BA4;p&#xFF0C;&#x76F4;&#x63A5;&#x56DE;&#x8F66;</span>
<span class="token comment"># 3.&#x5206;&#x533A;&#x597D;&#xFF1A;&#x9009;&#x9ED8;&#x8BA4;1&#xFF0C;&#x76F4;&#x63A5;&#x56DE;&#x8F66;</span>
<span class="token comment"># 4.&#x6247;&#x533A;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#xFF1A;&#x9009;&#x9ED8;&#x8BA4;2048&#xFF0C;&#x76F4;&#x63A5;&#x56DE;&#x8F66;</span>
<span class="token comment"># 5.&#x6247;&#x533A;&#x5927;&#x5C0F;&#xFF1A;&#x8F93;&#x5165;+200G</span>
</code></pre>
<ul>
<li>m &#x67E5;&#x770B;&#x547D;&#x4EE4;</li>
<li>n &#x65B0;&#x5EFA;&#x5206;&#x533A;</li>
<li>p &#x67E5;&#x770B;&#x5DF2;&#x6709;&#x5206;&#x533A;</li>
<li>w &#x4FDD;&#x5B58;&#x9000;&#x51FA;</li>
</ul>
<blockquote>
<p>&#x683C;&#x5F0F;&#x5316;&#x5206;&#x533A;</p>
</blockquote>
<pre class="language-"><code class="lang-shell">mkfs.ext4  /dev/vdc1
</code></pre>
<blockquote>
<p>&#x6302;&#x8F7D;&#x76EE;&#x5F55;</p>
</blockquote>
<p>mount&#x4E0D;&#x4F1A;&#x65B0;&#x5EFA;&#x6587;&#x4EF6;&#x5939;&#xFF0C;mount&#x4E4B;&#x524D;&#x8981;&#x65B0;&#x5EFA;&#x6587;&#x4EF6;&#x5939;</p>
<pre class="language-"><code class="lang-shell"><span class="token function">mkdir</span> /data
<span class="token function">mount</span> /dev/vdc1 /data
</code></pre>
<blockquote>
<p>&#x8BBE;&#x7F6E;&#x81EA;&#x52A8;&#x6302;&#x8F7D;</p>
</blockquote>
<pre class="language-"><code class="lang-shell"><span class="token comment"># 1.&#x5907;&#x4EFD;&#x6302;&#x8F7D;&#x6587;&#x4EF6;</span>
<span class="token function">cp</span> /etc/fstab /etc/fstab.bak
<span class="token comment"># 2.&#x67E5;&#x8BE2;&#x5206;&#x533A;UUID</span>
blkid
blkid /dev/vdc1
<span class="token comment"># 3.&#x6DFB;&#x52A0;&#x5230; /etc/fstab &#x6587;&#x4EF6;&#x4E2D;</span>
<span class="token comment">#   fs_dump:&#x5907;&#x4EFD;&#x9891;&#x7387;0&#x4ECE;&#x4E0D;&#x3001;1&#x6BCF;&#x5929;&#x3001;2&#x6BCF;&#x9694;&#x4E00;&#x5929;</span>
<span class="token comment">#   fs_pass&#x81EA;&#x68C0;&#x987A;&#x5E8F;:/&#x4E3A;1&#xFF0C;&#x5176;&#x4ED6;2-9</span>
<span class="token comment"># &#x78C1;&#x76D8;&#x5206;&#x533A;&#x3000;&#x3000;&#x3000;&#x3000;                              &#x6302;&#x8F7D;&#x76EE;&#x5F55;&#x3000;&#x3000;&#x3000;&#x3000;          &#x6587;&#x4EF6;&#x683C;&#x5F0F;  &#x8BBF;&#x95EE;&#x65B9;&#x5F0F;&#x3000;&#x3000;                 fs_dump fs_pass</span>
<span class="token assign-left variable">UUID</span><span class="token operator">=</span>1a889433-70dd-43bf-bfa0-b6176fdf695c /data                   ext4    defaults,errors<span class="token operator">=</span>panic        <span class="token number">0</span> <span class="token number">2</span>
</code></pre>
<h2 id="&#x78C1;&#x76D8;&#x65E5;&#x5FD7;"><a name="&#x78C1;&#x76D8;&#x65E5;&#x5FD7;" class="anchor-navigation-ex-anchor" href="#&#x78C1;&#x76D8;&#x65E5;&#x5FD7;"><i class="fa fa-link" aria-hidden="true"></i></a>4.2. &#x78C1;&#x76D8;&#x65E5;&#x5FD7;</h2>
<blockquote>
<p>&#x78C1;&#x76D8;&#x4F7F;&#x7528;&#x7387;&#x9AD8;&#x7684;&#x539F;&#x56E0;</p>
</blockquote>
<ul>
<li>&#x78C1;&#x76D8;&#x5206;&#x533A;&#x4E0D;&#x5408;&#x7406;&#xFF0C;&#x6839;&#x76EE;&#x5F55;&#x5206;&#x914D;&#x7684;&#x7A7A;&#x95F4;&#x592A;&#x5C0F;</li>
<li>&#x5220;&#x9664;&#x7684;&#x6587;&#x4EF6;&#x5C1A;&#x6709;&#x8FDB;&#x7A0B;&#x5728;&#x64CD;&#x4F5C;&#xFF0C;&#x7A7A;&#x95F4;&#x6CA1;&#x6709;&#x91CA;&#x653E;&#x6389;</li>
</ul>
<pre class="language-"><code class="lang-shell"><span class="token comment"># &#x4EC5;&#x67E5;&#x770B;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x6587;&#x4EF6;&#x53CA;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x4E0D;&#x770B;&#x5B50;&#x6587;&#x4EF6;&#x5939;</span>
<span class="token function">du</span> <span class="token parameter variable">-h</span> --max-depth<span class="token operator">=</span><span class="token number">1</span> /data
<span class="token function">du</span> <span class="token parameter variable">-h</span> <span class="token parameter variable">-d</span> <span class="token number">1</span> /data
<span class="token function">du</span> <span class="token parameter variable">-h</span> <span class="token parameter variable">-d</span> <span class="token number">1</span> /data <span class="token operator">|</span> <span class="token function">sort</span> <span class="token parameter variable">-h</span>
<span class="token function">du</span> <span class="token parameter variable">-h</span> <span class="token parameter variable">-d</span> <span class="token number">1</span> /data <span class="token operator">|</span> <span class="token function">sort</span> <span class="token parameter variable">-hr</span>
<span class="token comment"># &#x67E5;&#x770B;&#x78C1;&#x76D8;&#x4F7F;&#x7528;&#x7387;</span>
<span class="token function">df</span> <span class="token parameter variable">-h</span> /var/lib/kubelet
<span class="token comment"># &#x67E5;&#x770B;&#x5BF9;&#x5DF2;&#x5220;&#x9664;&#x6587;&#x4EF6;&#x8BFB;&#x5199;&#x64CD;&#x4F5C;&#x7684;&#x8FDB;&#x7A0B;</span>
<span class="token function">lsof</span> <span class="token operator">|</span> <span class="token function">grep</span> deleted
</code></pre>
<blockquote>
<p>lsof &#x5B57;&#x6BB5;&#x8BE6;&#x89E3;</p>
</blockquote>
<ul>
<li>COMMAND&#xFF1A; &#x6253;&#x5F00;&#x6587;&#x4EF6;&#x7684;&#x8FDB;&#x7A0B;&#x540D;&#x79F0;&#x3002;</li>
<li>PID&#xFF1A; &#x8FDB;&#x7A0B;&#x6807;&#x8BC6;&#x7B26;&#xFF0C;&#x5373;&#x8FDB;&#x7A0B;&#x7684;&#x552F;&#x4E00;&#x6807;&#x8BC6;&#x53F7;&#x3002;</li>
<li>USER&#xFF1A; &#x6253;&#x5F00;&#x6587;&#x4EF6;&#x7684;&#x7528;&#x6237;&#x540D;&#x3002;</li>
<li>FD&#xFF1A; &#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#xFF0C;&#x8868;&#x793A;&#x6587;&#x4EF6;&#x662F;&#x901A;&#x8FC7;&#x4F55;&#x79CD;&#x65B9;&#x5F0F;&#x88AB;&#x6253;&#x5F00;&#x7684;&#x3002;&#x5E38;&#x89C1;&#x7684;&#x53D6;&#x503C;&#x5305;&#x62EC;&#xFF1A;<ul>
<li>cwd&#xFF1A;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;</li>
<li>txt&#xFF1A;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#x6216;&#x5171;&#x4EAB;&#x5E93;</li>
<li>mem&#xFF1A;&#x5185;&#x5B58;&#x6620;&#x5C04;&#x6587;&#x4EF6;</li>
<li>REG&#xFF1A;&#x5E38;&#x89C4;&#x6587;&#x4EF6;</li>
<li>DIR&#xFF1A;&#x76EE;&#x5F55;</li>
<li>FIFO&#xFF1A;&#x547D;&#x540D;&#x7BA1;&#x9053;&#xFF08;FIFO&#xFF09;</li>
<li>CHR&#xFF1A;&#x5B57;&#x7B26;&#x8BBE;&#x5907;</li>
<li>BLK&#xFF1A;&#x5757;&#x8BBE;&#x5907;</li>
<li>UNIX&#xFF1A;Unix &#x57DF;&#x5957;&#x63A5;&#x5B57;</li>
</ul>
</li>
<li>TYPE&#xFF1A; &#x6587;&#x4EF6;&#x7C7B;&#x578B;&#xFF0C;&#x4E0E; FD &#x5B57;&#x6BB5;&#x7C7B;&#x4F3C;&#xFF0C;&#x4F46;&#x63D0;&#x4F9B;&#x66F4;&#x8BE6;&#x7EC6;&#x7684;&#x4FE1;&#x606F;&#x3002;</li>
<li>DEVICE&#xFF1A; &#x6587;&#x4EF6;&#x6240;&#x5728;&#x7684;&#x8BBE;&#x5907;&#x53F7;&#x3002;</li>
<li>SIZE/OFF&#xFF1A; &#x6587;&#x4EF6;&#x7684;&#x5927;&#x5C0F;&#x6216;&#x504F;&#x79FB;&#x91CF;&#x3002;</li>
<li>NODE&#xFF1A; &#x6587;&#x4EF6;&#x7684;&#x8282;&#x70B9;&#x53F7;&#xFF08;inode&#xFF09;&#x3002;</li>
<li>NAME&#xFF1A; &#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#x6216;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26;&#x540D;&#x3002;</li>
</ul>
<h2 id="&#x78C1;&#x76D8;&#x4ECB;&#x7ECD;"><a name="&#x78C1;&#x76D8;&#x4ECB;&#x7ECD;" class="anchor-navigation-ex-anchor" href="#&#x78C1;&#x76D8;&#x4ECB;&#x7ECD;"><i class="fa fa-link" aria-hidden="true"></i></a>4.3. &#x78C1;&#x76D8;&#x4ECB;&#x7ECD;</h2>
<p>LVM&#x662F;&#x903B;&#x8F91;&#x5377;&#x7BA1;&#x7406;&#xFF08;Logical Volume Manager&#xFF09;&#x7684;&#x7B80;&#x79F0;&#xFF0C;&#x5B83;&#x662F;Linux&#x73AF;&#x5883;&#x4E0B;&#x5BF9;&#x78C1;&#x76D8;&#x5206;&#x533A;&#x8FDB;&#x884C;&#x7BA1;&#x7406;&#x7684;&#x4E00;&#x79CD;&#x673A;&#x5236;</p>
<blockquote>
<p>&#x7269;&#x7406;&#x5B58;&#x50A8;&#x4ECB;&#x8D28;&#xFF08;The physical media&#xFF09;</p>
</blockquote>
<p>&#x6307;&#x7CFB;&#x7EDF;&#x7684;&#x7269;&#x7406;&#x5B58;&#x50A8;&#x8BBE;&#x5907;&#xFF0C;&#x5982;&#x786C;&#x76D8;&#xFF0C;&#x7CFB;&#x7EDF;&#x4E2D;&#x4E3A;/dev/hda&#x3001;/dev/sda&#x7B49;&#x7B49;&#xFF0C;&#x662F;&#x5B58;&#x50A8;&#x7CFB;&#x7EDF;&#x6700;&#x4F4E;&#x5C42;&#x7684;&#x5B58;&#x50A8;&#x5355;&#x5143;&#x3002;</p>
<blockquote>
<p>&#x7269;&#x7406;&#x5377;&#xFF08;Physical Volume&#xFF0C;PV&#xFF09;</p>
</blockquote>
<p>&#x6307;&#x786C;&#x76D8;&#x5206;&#x533A;&#x6216;&#x4ECE;&#x903B;&#x8F91;&#x4E0A;&#x4E0E;&#x78C1;&#x76D8;&#x5206;&#x533A;&#x5177;&#x6709;&#x540C;&#x6837;&#x529F;&#x80FD;&#x7684;&#x8BBE;&#x5907;(&#x5982;RAID)&#xFF0C;&#x662F;LVM&#x7684;&#x57FA;&#x672C;&#x5B58;&#x50A8;&#x903B;&#x8F91;&#x5757;&#x3002;&#x7269;&#x7406;&#x5377;&#x5305;&#x62EC;&#x4E00;&#x4E2A;&#x7279;&#x6B8A;&#x7684;&#x6807;&#x7B7E;&#xFF0C;&#x8BE5;&#x6807;&#x7B7E;&#x9ED8;&#x8BA4;&#x5B58;&#x653E;&#x5728;&#x7B2C;&#x4E8C;&#x4E2A; 512 &#x5B57;&#x8282;&#x6247;&#x533A;&#xFF0C;
&#x4F46;&#x4E5F;&#x53EF;&#x4EE5;&#x5C06;&#x6807;&#x7B7E;&#x653E;&#x5728;&#x6700;&#x5F00;&#x59CB;&#x7684;&#x56DB;&#x4E2A;&#x6247;&#x533A;&#x4E4B;&#x4E00;&#x3002;&#x8BE5;&#x6807;&#x7B7E;&#x5305;&#x542B;&#x7269;&#x7406;&#x5377;&#x7684;&#x968F;&#x673A;&#x552F;&#x4E00;&#x8BC6;&#x522B;&#x7B26;&#xFF08;UUID&#xFF09;&#xFF0C;&#x8BB0;&#x5F55;&#x5757;&#x8BBE;&#x5907;&#x7684;&#x5927;&#x5C0F;&#x548C;LVM&#x5143;&#x6570;&#x636E;&#x5728;&#x8BBE;&#x5907;&#x4E2D;&#x7684;&#x5B58;&#x50A8;&#x4F4D;&#x7F6E;&#x3002;</p>
<blockquote>
<p>&#x5377;&#x7EC4;&#xFF08;Volume Group&#xFF0C;VG&#xFF09;</p>
</blockquote>
<p>&#x7531;&#x7269;&#x7406;&#x5377;&#x7EC4;&#x6210;&#xFF0C;&#x5C4F;&#x853D;&#x4E86;&#x5E95;&#x5C42;&#x7269;&#x7406;&#x5377;&#x7EC6;&#x8282;&#x3002;&#x53EF;&#x5728;&#x5377;&#x7EC4;&#x4E0A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x903B;&#x8F91;&#x5377;&#x4E14;&#x4E0D;&#x7528;&#x8003;&#x8651;&#x5177;&#x4F53;&#x7684;&#x7269;&#x7406;&#x5377;&#x4FE1;&#x606F;&#x3002;</p>
<blockquote>
<p>&#x903B;&#x8F91;&#x5377;&#xFF08;Logical Volume&#xFF0C;LV&#xFF09;</p>
</blockquote>
<p>&#x5377;&#x7EC4;&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x7528;&#xFF0C;&#x9700;&#x8981;&#x5212;&#x5206;&#x6210;&#x903B;&#x8F91;&#x5377;&#x624D;&#x80FD;&#x4F7F;&#x7528;&#x3002;&#x903B;&#x8F91;&#x5377;&#x53EF;&#x4EE5;&#x683C;&#x5F0F;&#x5316;&#x6210;&#x4E0D;&#x540C;&#x7684;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#xFF0C;&#x6302;&#x8F7D;&#x540E;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x3002;</p>
<blockquote>
<p>&#x7269;&#x7406;&#x5757;&#xFF08;Physical Extent&#xFF0C;PE&#xFF09;</p>
</blockquote>
<p>&#x7269;&#x7406;&#x5377;&#x4EE5;&#x5927;&#x5C0F;&#x76F8;&#x7B49;&#x7684;&#x201C;&#x5757;&#x201D;&#x4E3A;&#x5355;&#x4F4D;&#x5B58;&#x50A8;&#xFF0C;&#x5757;&#x7684;&#x5927;&#x5C0F;&#x4E0E;&#x5377;&#x7EC4;&#x4E2D;&#x903B;&#x8F91;&#x5377;&#x5757;&#x7684;&#x5927;&#x5C0F;&#x76F8;&#x540C;&#x3002;</p>
<blockquote>
<p>&#x903B;&#x8F91;&#x5757;&#xFF08;Logical Extent&#xFF0C;LE&#xFF09;</p>
</blockquote>
<p>&#x903B;&#x8F91;&#x5377;&#x4EE5;&#x201C;&#x5757;&#x201D;&#x4E3A;&#x5355;&#x4F4D;&#x5B58;&#x50A8;&#xFF0C;&#x5728;&#x4E00;&#x5377;&#x7EC4;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x903B;&#x8F91;&#x5377;&#x7684;&#x5757;&#x5927;&#x5C0F;&#x662F;&#x76F8;&#x540C;&#x7684;&#x3002;</p>
<h1 id="&#x53C2;&#x8003;&#x6587;&#x6863;"><a name="&#x53C2;&#x8003;&#x6587;&#x6863;" class="anchor-navigation-ex-anchor" href="#&#x53C2;&#x8003;&#x6587;&#x6863;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x53C2;&#x8003;&#x6587;&#x6863;</h1>
<p><a href="https://blog.csdn.net/weixin_44863237/article/details/122101318" target="_blank">https://blog.csdn.net/weixin_44863237/article/details/122101318</a></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="gitbook.html" class="navigation navigation-prev " aria-label="Previous page: Gitbook">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="kylin.html" class="navigation navigation-next " aria-label="Next page: 麒麟系统">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Linux","level":"1.5.3","depth":2,"next":{"title":"麒麟系统","level":"1.5.4","depth":2,"path":"markdown/system/kylin.md","ref":"markdown/system/kylin.md","articles":[]},"previous":{"title":"Gitbook","level":"1.5.2","depth":2,"path":"markdown/system/gitbook.md","ref":"markdown/system/gitbook.md","articles":[]},"dir":"ltr"},"config":{"plugins":["theme-default","prism","-highlight","search-pro","-search","-lunr","expandable-chapters-small","splitter","-sharing","anchor-navigation-ex","code"],"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"},"pluginsConfig":{"prism":{},"search-pro":{},"expandable-chapters-small":{},"splitter":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"showLevel":false,"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}}},"theme":"default","author":"chenjiebin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pluginConfig":{"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"anchor-navigation-ex":{"showLevel":true},"theme-default":{"toggleMenu":false}},"variables":{},"title":"GitBook笔记","gitbook":"*","description":"学习笔记，包含前后端基础知识及框架的学习笔记"},"file":{"path":"markdown/system/linux.md","mtime":"2024-02-28T07:57:44.987Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2024-02-28T09:32:04.838Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

